package com.cu;


import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;

@SpringBootTest
public class redistest{
    @Autowired
    private RedisTemplate redisTemplate;
    @Test
    public void test1(){

        ListOperations listops = redisTemplate.opsForList();

        String[] str = new String[]{"yangrong","daye"};
       //listops.leftPushAll("user", str);
        System.out.println(listops.range("user",0,-1));

    }
}
